using System;
using System.Collections.Generic;

namespace WillsTuringMachines
{
	public interface ITuringMachine
	{
		/*
		 * According to the great & mighty Wikipedia...
		 * A Turing Machine M is defined by
		 * M = (Q,Rho,b,Sigma,delta,q0,F)
		 *	Q 	: A finite, non-empty set of states
		 *	Rho	: A finite, non-empty set of the tape alphabet
		 *	b `elem` Rho : the "blank symbol"
		 *	Sigma = Rho - {b}
		 *	q0	: initial state
		 *	F `subset` Q : Set of final aka accepting states
		 *	delta : A function mapping:
		 *		Q \ F X R -> Q X R X {L,R}
		*/ 

		/// <summary>
		/// Gets or sets the state alphabet: the set of
		/// objects allowed to represent the state of the machine
		/// </summary>
		/// <value>
		/// The state alphabet.
		/// </value>
		ISet<object> StateAlphabet { get; set; }	// Q

		/// <summary>
		/// Gets or sets the tape alphabet: the set of
		/// objects allowed to appear on the machine's input tape
		/// </summary>
		/// <value>
		/// The tape alphabet.
		/// </value>
		ISet<object> TapeAlphabet { get; set; }		// Rho

		/// <summary>
		/// Gets or sets the blank symbol: the symbol which
		/// is assumed to appear on unused tape slots (must be
		/// an element of TapeAlphabet)
		/// </summary>
		/// <value>
		/// The blank symbol.
		/// </value>
		object BlankSymbol { get; set; }			// b

		/// <summary>
		/// Gets or sets the initial state of the machine (must
		/// be an element of StateAlphabet)
		/// </summary>
		/// <value>
		/// The initial state.
		/// </value>
		object InitialState { get; set; }			// q0

		/// <summary>
		/// Gets or sets the final states: the states which will
		/// trigger or allow successful termination of the machine's operation.
		/// (must be a subset of StateAlphabet)
		/// </summary>
		/// <value>
		/// The final states.
		/// </value>
		ISet<object> FinalStates { get; set; }		// F
	}
}

